<template>
  <el-image :style="{width: widthStats+'px', heightStats: height+'px' ,borderRadius: '3px'}"  :src="src" :preview-src-list="[src]" >
    <div v-if="!errortype" slot="error" class="image-slot">
      <i class="el-icon-picture"></i>
    </div>
  </el-image>
</template>
<script>
export default{
  props:['src','errortype','width','height'],
  data(){
    return{
      heightStats:25,
      widthStats:25
    }
  },
  mounted() {
    if(this.width){
        this.widthStats= this.width;
        this.heightStats= this.height;
    }
  }
}

</script>
